<?php
include("include/config.inc.php");
$balArray = array();
$jamaRupiya = 0;
$udhaarRupiya = 0;
$selectBalace = "SELECT partyId,jamaRupiya,udhaarRupiya
                   FROM transaction
                  WHERE partyId = ".$_GET['partyId'];
$selectBalaceRes = mysql_query($selectBalace);
while($rowBal = mysql_fetch_array($selectBalaceRes))
{
	$partyId                         = $rowBal['partyId'];
	$jamaRupiya                     += $rowBal['jamaRupiya'];
	$udhaarRupiya                   += $rowBal['udhaarRupiya'];
}
echo $finalBal = $jamaRupiya - $udhaarRupiya;
?>            